#include "gpline.h"

void gpline::set(int integrationorder, std::vector<double>& coordinates, std::vector<double>& weights)
{
    // Max exact integration order = 2 * number of Gauss points - 1:
    int numberofgausspoints = ceil(0.5*(integrationorder+1));
    
    coordinates.resize(3*numberofgausspoints);
    weights.resize(numberofgausspoints);
        
    switch (numberofgausspoints)
    {
        case 0 ... 1:

            // Coordinates:
            coordinates[0] = 0;

            // Weights:
            weights[0] = 2.0;

            break;

        case 2:

            // Coordinates:
            coordinates[0] = -0.57735026918962576450914878050196;
            coordinates[3] = 0.57735026918962576450914878050196;

            // Weights:
            weights[0] = 1.0;
            weights[1] = 1.0;

            break;

        case 3:

            // Coordinates:
            coordinates[0] = -0.77459666924148337703585307995648;
            coordinates[3] = 0;
            coordinates[6] = 0.77459666924148337703585307995648;

            // Weights:
            weights[0] = 0.55555555555555555555555555555556;
            weights[1] = 0.88888888888888888888888888888889;
            weights[2] = 0.55555555555555555555555555555556;

            break;

        case 4:

            // Coordinates:
            coordinates[0] = -0.86113631159405257522394648889281;
            coordinates[3] = -0.33998104358485626480266575910324;
            coordinates[6] = 0.33998104358485626480266575910324;
            coordinates[9] = 0.86113631159405257522394648889281;

            // Weights:
            weights[0] = 0.347854845137453857373063949222;
            weights[1] = 0.652145154862546142626936050778;
            weights[2] = 0.652145154862546142626936050778;
            weights[3] = 0.347854845137453857373063949222;

            break;

        case 5:

            // Coordinates:
            coordinates[0] = -0.90617984593866399279762687829939;
            coordinates[3] = -0.53846931010568309103631442070021;
            coordinates[6] = 0;
            coordinates[9] = 0.53846931010568309103631442070021;
            coordinates[12] = 0.90617984593866399279762687829939;

            // Weights:
            weights[0] = 0.23692688505618908751426404071992;
            weights[1] = 0.47862867049936646804129151483564;
            weights[2] = 0.56888888888888888888888888888889;
            weights[3] = 0.47862867049936646804129151483564;
            weights[4] = 0.23692688505618908751426404071992;

            break;

        case 6:

            // Coordinates:
            coordinates[0] = -0.93246951420315202781230155449399;
            coordinates[3] = -0.66120938646626451366139959501991;
            coordinates[6] = -0.23861918608319690863050172168071;
            coordinates[9] = 0.23861918608319690863050172168071;
            coordinates[12] = 0.66120938646626451366139959501991;
            coordinates[15] = 0.93246951420315202781230155449399;

            // Weights:
            weights[0] = 0.17132449237917034504029614217273;
            weights[1] = 0.36076157304813860756983351383772;
            weights[2] = 0.46791393457269104738987034398955;
            weights[3] = 0.46791393457269104738987034398955;
            weights[4] = 0.36076157304813860756983351383772;
            weights[5] = 0.17132449237917034504029614217273;

            break;

        case 7:

            // Coordinates:
            coordinates[0] = -0.94910791234275852452618968404785;
            coordinates[3] = -0.74153118559939443986386477328079;
            coordinates[6] = -0.40584515137739716690660641207696;
            coordinates[9] = 0;
            coordinates[12] = 0.40584515137739716690660641207696;
            coordinates[15] = 0.74153118559939443986386477328079;
            coordinates[18] = 0.94910791234275852452618968404785;

            // Weights:
            weights[0] = 0.12948496616886969327061143267908;
            weights[1] = 0.27970539148927666790146777142378;
            weights[2] = 0.38183005050511894495036977548898;
            weights[3] = 0.41795918367346938775510204081633;
            weights[4] = 0.38183005050511894495036977548898;
            weights[5] = 0.27970539148927666790146777142378;
            weights[6] = 0.12948496616886969327061143267908;

            break;

        case 8:

            // Coordinates:
            coordinates[0] = -0.96028985649753623168356086856947;
            coordinates[3] = -0.79666647741362673959155393647583;
            coordinates[6] = -0.52553240991632898581773904918925;
            coordinates[9] = -0.18343464249564980493947614236018;
            coordinates[12] = 0.18343464249564980493947614236018;
            coordinates[15] = 0.52553240991632898581773904918925;
            coordinates[18] = 0.79666647741362673959155393647583;
            coordinates[21] = 0.96028985649753623168356086856947;

            // Weights:
            weights[0] = 0.10122853629037625915253135430996;
            weights[1] = 0.22238103445337447054435599442624;
            weights[2] = 0.3137066458778872873379622019866;
            weights[3] = 0.3626837833783619829651504492772;
            weights[4] = 0.3626837833783619829651504492772;
            weights[5] = 0.3137066458778872873379622019866;
            weights[6] = 0.22238103445337447054435599442624;
            weights[7] = 0.10122853629037625915253135430996;

            break;

        case 9:

            // Coordinates:
            coordinates[0] = -0.96816023950762608983557620290367;
            coordinates[3] = -0.83603110732663579429942978806973;
            coordinates[6] = -0.61337143270059039730870203934147;
            coordinates[9] = -0.32425342340380892903853801464334;
            coordinates[12] = 0;
            coordinates[15] = 0.32425342340380892903853801464334;
            coordinates[18] = 0.61337143270059039730870203934147;
            coordinates[21] = 0.83603110732663579429942978806973;
            coordinates[24] = 0.96816023950762608983557620290367;

            // Weights:
            weights[0] = 0.081274388361574411971892158110524;
            weights[1] = 0.18064816069485740405847203124291;
            weights[2] = 0.26061069640293546231874286941863;
            weights[3] = 0.31234707704000284006863040658444;
            weights[4] = 0.33023935500125976316452506928697;
            weights[5] = 0.31234707704000284006863040658444;
            weights[6] = 0.26061069640293546231874286941863;
            weights[7] = 0.18064816069485740405847203124291;
            weights[8] = 0.081274388361574411971892158110524;

            break;

        case 10:

            // Coordinates:
            coordinates[0] = -0.97390652851717172007796401208445;
            coordinates[3] = -0.86506336668898451073209668842349;
            coordinates[6] = -0.67940956829902440623432736511487;
            coordinates[9] = -0.43339539412924719079926594316578;
            coordinates[12] = -0.14887433898163121088482600112972;
            coordinates[15] = 0.14887433898163121088482600112972;
            coordinates[18] = 0.43339539412924719079926594316578;
            coordinates[21] = 0.67940956829902440623432736511487;
            coordinates[24] = 0.86506336668898451073209668842349;
            coordinates[27] = 0.97390652851717172007796401208445;

            // Weights:
            weights[0] = 0.066671344308688137593568809893332;
            weights[1] = 0.1494513491505805931457763396577;
            weights[2] = 0.21908636251598204399553493422816;
            weights[3] = 0.26926671930999635509122692156947;
            weights[4] = 0.29552422471475287017389299465134;
            weights[5] = 0.29552422471475287017389299465134;
            weights[6] = 0.26926671930999635509122692156947;
            weights[7] = 0.21908636251598204399553493422816;
            weights[8] = 0.1494513491505805931457763396577;
            weights[9] = 0.066671344308688137593568809893332;

            break;

        case 11:

            // Coordinates:
            coordinates[0] = -0.97822865814605699280393800112286;
            coordinates[3] = -0.88706259976809529907515776930393;
            coordinates[6] = -0.73015200557404932409341625203115;
            coordinates[9] = -0.51909612920681181592572566945861;
            coordinates[12] = -0.26954315595234497233153198540086;
            coordinates[15] = 0;
            coordinates[18] = 0.26954315595234497233153198540086;
            coordinates[21] = 0.51909612920681181592572566945861;
            coordinates[24] = 0.73015200557404932409341625203115;
            coordinates[27] = 0.88706259976809529907515776930393;
            coordinates[30] = 0.97822865814605699280393800112286;

            // Weights:
            weights[0] = 0.055668567116173666482753720442549;
            weights[1] = 0.12558036946490462463469429922394;
            weights[2] = 0.18629021092773425142609764143166;
            weights[3] = 0.23319376459199047991852370484318;
            weights[4] = 0.26280454451024666218068886989051;
            weights[5] = 0.27292508677790063071448352833634;
            weights[6] = 0.26280454451024666218068886989051;
            weights[7] = 0.23319376459199047991852370484318;
            weights[8] = 0.18629021092773425142609764143166;
            weights[9] = 0.12558036946490462463469429922394;
            weights[10] = 0.055668567116173666482753720442549;

            break;

        case 12:

            // Coordinates:
            coordinates[0] = -0.98156063424671925069054909014928;
            coordinates[3] = -0.9041172563704748566784658661191;
            coordinates[6] = -0.76990267419430468703689383321282;
            coordinates[9] = -0.58731795428661744729670241894053;
            coordinates[12] = -0.36783149899818019375269153664372;
            coordinates[15] = -0.12523340851146891547244136946385;
            coordinates[18] = 0.12523340851146891547244136946385;
            coordinates[21] = 0.36783149899818019375269153664372;
            coordinates[24] = 0.58731795428661744729670241894053;
            coordinates[27] = 0.76990267419430468703689383321282;
            coordinates[30] = 0.9041172563704748566784658661191;
            coordinates[33] = 0.98156063424671925069054909014928;

            // Weights:
            weights[0] = 0.047175336386511827194615961485017;
            weights[1] = 0.106939325995318430960254718194;
            weights[2] = 0.16007832854334622633465252954336;
            weights[3] = 0.2031674267230659217490644558098;
            weights[4] = 0.23349253653835480876084989892488;
            weights[5] = 0.24914704581340278500056243604295;
            weights[6] = 0.24914704581340278500056243604295;
            weights[7] = 0.23349253653835480876084989892488;
            weights[8] = 0.2031674267230659217490644558098;
            weights[9] = 0.16007832854334622633465252954336;
            weights[10] = 0.106939325995318430960254718194;
            weights[11] = 0.047175336386511827194615961485017;

            break;

        case 13:

            // Coordinates:
            coordinates[0] = -0.98418305471858814947282944880711;
            coordinates[3] = -0.91759839922297796520654783650072;
            coordinates[6] = -0.80157809073330991279420648958286;
            coordinates[9] = -0.64234933944034022064398460699552;
            coordinates[12] = -0.44849275103644685287791285212764;
            coordinates[15] = -0.23045831595513479406552812109799;
            coordinates[18] = 0;
            coordinates[21] = 0.23045831595513479406552812109799;
            coordinates[24] = 0.44849275103644685287791285212764;
            coordinates[27] = 0.64234933944034022064398460699552;
            coordinates[30] = 0.80157809073330991279420648958286;
            coordinates[33] = 0.91759839922297796520654783650072;
            coordinates[36] = 0.98418305471858814947282944880711;

            // Weights:
            weights[0] = 0.040484004765315879520021592200986;
            weights[1] = 0.092121499837728447914421775953797;
            weights[2] = 0.13887351021978723846360177686887;
            weights[3] = 0.1781459807619457382800466919961;
            weights[4] = 0.20781604753688850231252321930605;
            weights[5] = 0.22628318026289723841209018603978;
            weights[6] = 0.23255155323087391019458951526884;
            weights[7] = 0.22628318026289723841209018603978;
            weights[8] = 0.20781604753688850231252321930605;
            weights[9] = 0.1781459807619457382800466919961;
            weights[10] = 0.13887351021978723846360177686887;
            weights[11] = 0.092121499837728447914421775953797;
            weights[12] = 0.040484004765315879520021592200986;

            break;

        case 14:

            // Coordinates:
            coordinates[0] = -0.98628380869681233884159726670405;
            coordinates[3] = -0.92843488366357351733639113937787;
            coordinates[6] = -0.82720131506976499318979474265039;
            coordinates[9] = -0.68729290481168547014801980301933;
            coordinates[12] = -0.51524863635815409196529071855119;
            coordinates[15] = -0.31911236892788976043567182416848;
            coordinates[18] = -0.10805494870734366206624465021983;
            coordinates[21] = 0.10805494870734366206624465021983;
            coordinates[24] = 0.31911236892788976043567182416848;
            coordinates[27] = 0.51524863635815409196529071855119;
            coordinates[30] = 0.68729290481168547014801980301933;
            coordinates[33] = 0.82720131506976499318979474265039;
            coordinates[36] = 0.92843488366357351733639113937787;
            coordinates[39] = 0.98628380869681233884159726670405;

            // Weights:
            weights[0] = 0.035119460331751863031832876138192;
            weights[1] = 0.080158087159760209805633277062854;
            weights[2] = 0.12151857068790318468941480907248;
            weights[3] = 0.15720316715819353456960193862384;
            weights[4] = 0.18553839747793781374171659012516;
            weights[5] = 0.20519846372129560396592406566122;
            weights[6] = 0.21526385346315779019587644331626;
            weights[7] = 0.21526385346315779019587644331626;
            weights[8] = 0.20519846372129560396592406566122;
            weights[9] = 0.18553839747793781374171659012516;
            weights[10] = 0.15720316715819353456960193862384;
            weights[11] = 0.12151857068790318468941480907248;
            weights[12] = 0.080158087159760209805633277062854;
            weights[13] = 0.035119460331751863031832876138192;

            break;

        case 15:

            // Coordinates:
            coordinates[0] = -0.98799251802048542848956571858661;
            coordinates[3] = -0.93727339240070590430775894771021;
            coordinates[6] = -0.84820658341042721620064832077422;
            coordinates[9] = -0.72441773136017004741618605461394;
            coordinates[12] = -0.57097217260853884753722673725391;
            coordinates[15] = -0.39415134707756336989720737098105;
            coordinates[18] = -0.2011940939974345223006283033946;
            coordinates[21] = 0;
            coordinates[24] = 0.2011940939974345223006283033946;
            coordinates[27] = 0.39415134707756336989720737098105;
            coordinates[30] = 0.57097217260853884753722673725391;
            coordinates[33] = 0.72441773136017004741618605461394;
            coordinates[36] = 0.84820658341042721620064832077422;
            coordinates[39] = 0.93727339240070590430775894771021;
            coordinates[42] = 0.98799251802048542848956571858661;

            // Weights:
            weights[0] = 0.030753241996117268354628393577204;
            weights[1] = 0.070366047488108124709267416450667;
            weights[2] = 0.10715922046717193501186954668587;
            weights[3] = 0.13957067792615431444780479451103;
            weights[4] = 0.16626920581699393355320086048121;
            weights[5] = 0.18616100001556221102680056186642;
            weights[6] = 0.19843148532711157645611832644384;
            weights[7] = 0.20257824192556127288062019996752;
            weights[8] = 0.19843148532711157645611832644384;
            weights[9] = 0.18616100001556221102680056186642;
            weights[10] = 0.16626920581699393355320086048121;
            weights[11] = 0.13957067792615431444780479451103;
            weights[12] = 0.10715922046717193501186954668587;
            weights[13] = 0.070366047488108124709267416450667;
            weights[14] = 0.030753241996117268354628393577204;

            break;

        case 16:

            // Coordinates:
            coordinates[0] = -0.98940093499164993259615417345033;
            coordinates[3] = -0.94457502307323257607798841553461;
            coordinates[6] = -0.86563120238783174388046789771239;
            coordinates[9] = -0.75540440835500303389510119484744;
            coordinates[12] = -0.61787624440264374844667176404879;
            coordinates[15] = -0.45801677765722738634241944298358;
            coordinates[18] = -0.2816035507792589132304605014605;
            coordinates[21] = -0.095012509837637440185319335424958;
            coordinates[24] = 0.095012509837637440185319335424958;
            coordinates[27] = 0.2816035507792589132304605014605;
            coordinates[30] = 0.45801677765722738634241944298358;
            coordinates[33] = 0.61787624440264374844667176404879;
            coordinates[36] = 0.75540440835500303389510119484744;
            coordinates[39] = 0.86563120238783174388046789771239;
            coordinates[42] = 0.94457502307323257607798841553461;
            coordinates[45] = 0.98940093499164993259615417345033;

            // Weights:
            weights[0] = 0.027152459411754094851780572456018;
            weights[1] = 0.062253523938647892862843836994378;
            weights[2] = 0.095158511682492784809925107602246;
            weights[3] = 0.12462897125553387205247628219202;
            weights[4] = 0.14959598881657673208150173054748;
            weights[5] = 0.16915651939500253818931207903036;
            weights[6] = 0.18260341504492358886676366796922;
            weights[7] = 0.18945061045506849628539672320828;
            weights[8] = 0.18945061045506849628539672320828;
            weights[9] = 0.18260341504492358886676366796922;
            weights[10] = 0.16915651939500253818931207903036;
            weights[11] = 0.14959598881657673208150173054748;
            weights[12] = 0.12462897125553387205247628219202;
            weights[13] = 0.095158511682492784809925107602246;
            weights[14] = 0.062253523938647892862843836994378;
            weights[15] = 0.027152459411754094851780572456018;

            break;

        case 17:

            // Coordinates:
            coordinates[0] = -0.99057547531441733567543401994067;
            coordinates[3] = -0.9506755217687677612227169578958;
            coordinates[6] = -0.88023915372698590212295569448816;
            coordinates[9] = -0.78151400389680140692523005552048;
            coordinates[12] = -0.657671159216690765850302216643;
            coordinates[15] = -0.51269053708647696788624656862955;
            coordinates[18] = -0.35123176345387631529718551709535;
            coordinates[21] = -0.17848418149584785585067749365407;
            coordinates[24] = 0;
            coordinates[27] = 0.17848418149584785585067749365407;
            coordinates[30] = 0.35123176345387631529718551709535;
            coordinates[33] = 0.51269053708647696788624656862955;
            coordinates[36] = 0.657671159216690765850302216643;
            coordinates[39] = 0.78151400389680140692523005552048;
            coordinates[42] = 0.88023915372698590212295569448816;
            coordinates[45] = 0.9506755217687677612227169578958;
            coordinates[48] = 0.99057547531441733567543401994067;

            // Weights:
            weights[0] = 0.024148302868547931960110026287565;
            weights[1] = 0.055459529373987201129440165358245;
            weights[2] = 0.085036148317179180883535370191062;
            weights[3] = 0.11188384719340397109478838562636;
            weights[4] = 0.13513636846852547328631998170235;
            weights[5] = 0.15404576107681028808143159480196;
            weights[6] = 0.16800410215645004450997066378832;
            weights[7] = 0.1765627053669926463252709901132;
            weights[8] = 0.17944647035620652545826564426189;
            weights[9] = 0.1765627053669926463252709901132;
            weights[10] = 0.16800410215645004450997066378832;
            weights[11] = 0.15404576107681028808143159480196;
            weights[12] = 0.13513636846852547328631998170235;
            weights[13] = 0.11188384719340397109478838562636;
            weights[14] = 0.085036148317179180883535370191062;
            weights[15] = 0.055459529373987201129440165358245;
            weights[16] = 0.024148302868547931960110026287565;

            break;

        case 18:

            // Coordinates:
            coordinates[0] = -0.99156516842093094673001600470615;
            coordinates[3] = -0.95582394957139775518119589292978;
            coordinates[6] = -0.89260246649755573920606059112715;
            coordinates[9] = -0.80370495897252311568241745501459;
            coordinates[12] = -0.69168704306035320787489108128885;
            coordinates[15] = -0.55977083107394753460787154852533;
            coordinates[18] = -0.41175116146284264603593179383305;
            coordinates[21] = -0.25188622569150550958897285487791;
            coordinates[24] = -0.084775013041735301242261852935784;
            coordinates[27] = 0.084775013041735301242261852935784;
            coordinates[30] = 0.25188622569150550958897285487791;
            coordinates[33] = 0.41175116146284264603593179383305;
            coordinates[36] = 0.55977083107394753460787154852533;
            coordinates[39] = 0.69168704306035320787489108128885;
            coordinates[42] = 0.80370495897252311568241745501459;
            coordinates[45] = 0.89260246649755573920606059112715;
            coordinates[48] = 0.95582394957139775518119589292978;
            coordinates[51] = 0.99156516842093094673001600470615;

            // Weights:
            weights[0] = 0.021616013526483310313342710266452;
            weights[1] = 0.049714548894969796453334946202639;
            weights[2] = 0.076425730254889056529129677616637;
            weights[3] = 0.10094204410628716556281398492483;
            weights[4] = 0.1225552067114784601845191268002;
            weights[5] = 0.14064291467065065120473130375195;
            weights[6] = 0.15468467512626524492541800383637;
            weights[7] = 0.16427648374583272298605377646593;
            weights[8] = 0.16914238296314359184065647013499;
            weights[9] = 0.16914238296314359184065647013499;
            weights[10] = 0.16427648374583272298605377646593;
            weights[11] = 0.15468467512626524492541800383637;
            weights[12] = 0.14064291467065065120473130375195;
            weights[13] = 0.1225552067114784601845191268002;
            weights[14] = 0.10094204410628716556281398492483;
            weights[15] = 0.076425730254889056529129677616637;
            weights[16] = 0.049714548894969796453334946202639;
            weights[17] = 0.021616013526483310313342710266452;

            break;

        case 19:

            // Coordinates:
            coordinates[0] = -0.99240684384358440318901767025326;
            coordinates[3] = -0.96020815213483003085277884068765;
            coordinates[6] = -0.90315590361481790164266092853231;
            coordinates[9] = -0.82271465653714282497892248671271;
            coordinates[12] = -0.72096617733522937861709586082378;
            coordinates[15] = -0.60054530466168102346963816494624;
            coordinates[18] = -0.4645707413759609457172671481041;
            coordinates[21] = -0.31656409996362983199011732884984;
            coordinates[24] = -0.16035864564022537586809611574074;
            coordinates[27] = 0;
            coordinates[30] = 0.16035864564022537586809611574074;
            coordinates[33] = 0.31656409996362983199011732884984;
            coordinates[36] = 0.4645707413759609457172671481041;
            coordinates[39] = 0.60054530466168102346963816494624;
            coordinates[42] = 0.72096617733522937861709586082378;
            coordinates[45] = 0.82271465653714282497892248671271;
            coordinates[48] = 0.90315590361481790164266092853231;
            coordinates[51] = 0.96020815213483003085277884068765;
            coordinates[54] = 0.99240684384358440318901767025326;

            // Weights:
            weights[0] = 0.019461788229726477036312041464438;
            weights[1] = 0.044814226765699600332838157401994;
            weights[2] = 0.069044542737641226580708258006013;
            weights[3] = 0.09149002162244999946446209412384;
            weights[4] = 0.11156664554733399471602390168177;
            weights[5] = 0.12875396253933622767551578485688;
            weights[6] = 0.1426067021736066117757461094419;
            weights[7] = 0.15276604206585966677885540089766;
            weights[8] = 0.15896884339395434764995643946505;
            weights[9] = 0.16105444984878369597916362532092;
            weights[10] = 0.15896884339395434764995643946505;
            weights[11] = 0.15276604206585966677885540089766;
            weights[12] = 0.1426067021736066117757461094419;
            weights[13] = 0.12875396253933622767551578485688;
            weights[14] = 0.11156664554733399471602390168177;
            weights[15] = 0.09149002162244999946446209412384;
            weights[16] = 0.069044542737641226580708258006013;
            weights[17] = 0.044814226765699600332838157401994;
            weights[18] = 0.019461788229726477036312041464438;

            break;

        case 20:

            // Coordinates:
            coordinates[0] = -0.99312859918509492478612238847132;
            coordinates[3] = -0.96397192727791379126766613119728;
            coordinates[6] = -0.9122344282513259058677524412033;
            coordinates[9] = -0.83911697182221882339452906170152;
            coordinates[12] = -0.74633190646015079261430507035564;
            coordinates[15] = -0.63605368072651502545283669622629;
            coordinates[18] = -0.51086700195082709800436405095525;
            coordinates[21] = -0.37370608871541956067254817702493;
            coordinates[24] = -0.22778585114164507808049619536857;
            coordinates[27] = -0.076526521133497333754640409398838;
            coordinates[30] = 0.076526521133497333754640409398838;
            coordinates[33] = 0.22778585114164507808049619536857;
            coordinates[36] = 0.37370608871541956067254817702493;
            coordinates[39] = 0.51086700195082709800436405095525;
            coordinates[42] = 0.63605368072651502545283669622629;
            coordinates[45] = 0.74633190646015079261430507035564;
            coordinates[48] = 0.83911697182221882339452906170152;
            coordinates[51] = 0.9122344282513259058677524412033;
            coordinates[54] = 0.96397192727791379126766613119728;
            coordinates[57] = 0.99312859918509492478612238847132;

            // Weights:
            weights[0] = 0.017614007139152118311861962351853;
            weights[1] = 0.040601429800386941331039952274932;
            weights[2] = 0.062672048334109063569506535187042;
            weights[3] = 0.083276741576704748724758143222046;
            weights[4] = 0.10193011981724043503675013548035;
            weights[5] = 0.11819453196151841731237737771138;
            weights[6] = 0.13168863844917662689849449974816;
            weights[7] = 0.14209610931838205132929832506716;
            weights[8] = 0.14917298647260374678782873700197;
            weights[9] = 0.1527533871307258506980843319551;
            weights[10] = 0.1527533871307258506980843319551;
            weights[11] = 0.14917298647260374678782873700197;
            weights[12] = 0.14209610931838205132929832506716;
            weights[13] = 0.13168863844917662689849449974816;
            weights[14] = 0.11819453196151841731237737771138;
            weights[15] = 0.10193011981724043503675013548035;
            weights[16] = 0.083276741576704748724758143222046;
            weights[17] = 0.062672048334109063569506535187042;
            weights[18] = 0.040601429800386941331039952274932;
            weights[19] = 0.017614007139152118311861962351853;

            break;

        case 21:

            // Coordinates:
            coordinates[0] = -0.99375217062038950026024203593794;
            coordinates[3] = -0.9672268385663062943166222149077;
            coordinates[6] = -0.92009933415040082879018713371496;
            coordinates[9] = -0.85336336458331728364725063858757;
            coordinates[12] = -0.76843996347567790861587785130622;
            coordinates[15] = -0.66713880419741231930596666999034;
            coordinates[18] = -0.55161883588721980705901879672431;
            coordinates[21] = -0.42434212020743878357366888854379;
            coordinates[24] = -0.2880213168024010966007925160646;
            coordinates[27] = -0.14556185416089509093703098233869;
            coordinates[30] = 0;
            coordinates[33] = 0.14556185416089509093703098233869;
            coordinates[36] = 0.2880213168024010966007925160646;
            coordinates[39] = 0.42434212020743878357366888854379;
            coordinates[42] = 0.55161883588721980705901879672431;
            coordinates[45] = 0.66713880419741231930596666999034;
            coordinates[48] = 0.76843996347567790861587785130623;
            coordinates[51] = 0.85336336458331728364725063858756;
            coordinates[54] = 0.92009933415040082879018713371497;
            coordinates[57] = 0.96722683856630629431662221490769;
            coordinates[60] = 0.99375217062038950026024203593794;

            // Weights:
            weights[0] = 0.016017228257774333324224616858403;
            weights[1] = 0.036953789770852493799950668299422;
            weights[2] = 0.057134425426857208283635826472357;
            weights[3] = 0.076100113628379302017051653300256;
            weights[4] = 0.093444423456033861553289741113883;
            weights[5] = 0.10879729916714837766347457807013;
            weights[6] = 0.12183141605372853419536717712572;
            weights[7] = 0.13226893863333746178105257449678;
            weights[8] = 0.13988739479107315472213342386758;
            weights[9] = 0.14452440398997005906382716655375;
            weights[10] = 0.14608113364969042719198514768337;
            weights[11] = 0.14452440398997005906382716655375;
            weights[12] = 0.13988739479107315472213342386758;
            weights[13] = 0.13226893863333746178105257449678;
            weights[14] = 0.12183141605372853419536717712574;
            weights[15] = 0.1087972991671483776634745780701;
            weights[16] = 0.09344442345603386155328974111395;
            weights[17] = 0.076100113628379302017051653300153;
            weights[18] = 0.057134425426857208283635826472488;
            weights[19] = 0.036953789770852493799950668299287;
            weights[20] = 0.016017228257774333324224616858503;

            break;

        case 22:

            // Coordinates:
            coordinates[0] = -0.9942945854823992920730314211613;
            coordinates[3] = -0.97006049783542872712395098676527;
            coordinates[6] = -0.92695677218717400052069293925905;
            coordinates[9] = -0.86581257772030013653642563701938;
            coordinates[12] = -0.78781680597920816200427795540835;
            coordinates[15] = -0.69448726318668278005068983576226;
            coordinates[18] = -0.58764040350691159295887692763865;
            coordinates[21] = -0.46935583798675702640633071096641;
            coordinates[24] = -0.34193582089208422515814742042738;
            coordinates[27] = -0.20786042668822128547884653391955;
            coordinates[30] = -0.069739273319722221213841796118628;
            coordinates[33] = 0.069739273319722221213841796118628;
            coordinates[36] = 0.20786042668822128547884653391955;
            coordinates[39] = 0.34193582089208422515814742042738;
            coordinates[42] = 0.46935583798675702640633071096641;
            coordinates[45] = 0.58764040350691159295887692763865;
            coordinates[48] = 0.69448726318668278005068983576226;
            coordinates[51] = 0.78781680597920816200427795540835;
            coordinates[54] = 0.86581257772030013653642563701938;
            coordinates[57] = 0.92695677218717400052069293925905;
            coordinates[60] = 0.97006049783542872712395098676527;
            coordinates[63] = 0.9942945854823992920730314211613;

            // Weights:
            weights[0] = 0.014627995298272200684991098047185;
            weights[1] = 0.033774901584814154793302246865913;
            weights[2] = 0.052293335152683285940312051273211;
            weights[3] = 0.069796468424520488094961418930218;
            weights[4] = 0.085941606217067727414443681372703;
            weights[5] = 0.10041414444288096493207883783054;
            weights[6] = 0.11293229608053921839340060742178;
            weights[7] = 0.12325237681051242428556098615481;
            weights[8] = 0.13117350478706237073296499253031;
            weights[9] = 0.13654149834601517135257383123152;
            weights[10] = 0.13925187285563199337541024834181;
            weights[11] = 0.13925187285563199337541024834181;
            weights[12] = 0.13654149834601517135257383123152;
            weights[13] = 0.13117350478706237073296499253031;
            weights[14] = 0.12325237681051242428556098615481;
            weights[15] = 0.11293229608053921839340060742178;
            weights[16] = 0.10041414444288096493207883783054;
            weights[17] = 0.085941606217067727414443681372703;
            weights[18] = 0.069796468424520488094961418930218;
            weights[19] = 0.052293335152683285940312051273211;
            weights[20] = 0.033774901584814154793302246865913;
            weights[21] = 0.014627995298272200684991098047185;

            break;

        case 23:

            // Coordinates:
            coordinates[0] = -0.99476933499755212352392571544557;
            coordinates[3] = -0.97254247121811523195602407682078;
            coordinates[6] = -0.93297108682601610234919698903842;
            coordinates[9] = -0.87675235827044166737815688593415;
            coordinates[12] = -0.80488840161883989215111840699678;
            coordinates[15] = -0.71866136313195019446162448374862;
            coordinates[18] = -0.6196098757636461563850973116496;
            coordinates[21] = -0.50950147784600754968979304786685;
            coordinates[24] = -0.39030103803029083142148887288061;
            coordinates[27] = -0.26413568097034493053386953828331;
            coordinates[30] = -0.13325682429846611093174268224177;
            coordinates[33] = 0;
            coordinates[36] = 0.13325682429846611093174268224177;
            coordinates[39] = 0.26413568097034493053386953828331;
            coordinates[42] = 0.39030103803029083142148887288061;
            coordinates[45] = 0.50950147784600754968979304786685;
            coordinates[48] = 0.6196098757636461563850973116496;
            coordinates[51] = 0.71866136313195019446162448374862;
            coordinates[54] = 0.80488840161883989215111840699678;
            coordinates[57] = 0.87675235827044166737815688593415;
            coordinates[60] = 0.93297108682601610234919698903842;
            coordinates[63] = 0.97254247121811523195602407682078;
            coordinates[66] = 0.99476933499755212352392571544557;

            // Weights:
            weights[0] = 0.013411859487141772081309493458615;
            weights[1] = 0.030988005856979444310694219641885;
            weights[2] = 0.048037671731084668571641071632034;
            weights[3] = 0.064232421408525852127169615158911;
            weights[4] = 0.079281411776718954922892524742043;
            weights[5] = 0.092915766060035147477018617369765;
            weights[6] = 0.10489209146454141007408618501474;
            weights[7] = 0.11499664022241136494164351293396;
            weights[8] = 0.12304908430672953046757840067201;
            weights[9] = 0.12890572218808214997859533939979;
            weights[10] = 0.13246203940469661737164246470332;
            weights[11] = 0.13365457218610617535145711054584;
            weights[12] = 0.13246203940469661737164246470332;
            weights[13] = 0.12890572218808214997859533939979;
            weights[14] = 0.12304908430672953046757840067201;
            weights[15] = 0.11499664022241136494164351293396;
            weights[16] = 0.10489209146454141007408618501474;
            weights[17] = 0.092915766060035147477018617369765;
            weights[18] = 0.079281411776718954922892524742043;
            weights[19] = 0.064232421408525852127169615158911;
            weights[20] = 0.048037671731084668571641071632034;
            weights[21] = 0.030988005856979444310694219641885;
            weights[22] = 0.013411859487141772081309493458615;

            break;

        case 24:

            // Coordinates:
            coordinates[0] = -0.99518721999702136017999740970074;
            coordinates[3] = -0.97472855597130949819839199300817;
            coordinates[6] = -0.93827455200273275852364900170872;
            coordinates[9] = -0.8864155270044010342131543419822;
            coordinates[12] = -0.82000198597390292195394987266975;
            coordinates[15] = -0.74012419157855436424382810309998;
            coordinates[18] = -0.64809365193697556925249578691075;
            coordinates[21] = -0.54542147138883953565837561721837;
            coordinates[24] = -0.43379350762604513848708423191335;
            coordinates[27] = -0.31504267969616337438679329131981;
            coordinates[30] = -0.19111886747361630915863982075707;
            coordinates[33] = -0.064056892862605626085043082624745;
            coordinates[36] = 0.064056892862605626085043082624745;
            coordinates[39] = 0.19111886747361630915863982075707;
            coordinates[42] = 0.31504267969616337438679329131981;
            coordinates[45] = 0.43379350762604513848708423191335;
            coordinates[48] = 0.54542147138883953565837561721837;
            coordinates[51] = 0.64809365193697556925249578691075;
            coordinates[54] = 0.74012419157855436424382810309998;
            coordinates[57] = 0.82000198597390292195394987266975;
            coordinates[60] = 0.8864155270044010342131543419822;
            coordinates[63] = 0.93827455200273275852364900170872;
            coordinates[66] = 0.97472855597130949819839199300817;
            coordinates[69] = 0.99518721999702136017999740970074;

            // Weights:
            weights[0] = 0.012341229799987199546805667070037;
            weights[1] = 0.028531388628933663181307815951878;
            weights[2] = 0.044277438817419806168602748211338;
            weights[3] = 0.059298584915436780746367758500109;
            weights[4] = 0.073346481411080305734033615253117;
            weights[5] = 0.086190161531953275917185202983743;
            weights[6] = 0.097618652104113888269880664464247;
            weights[7] = 0.10744427011596563478257734244661;
            weights[8] = 0.11550566805372560135334448390678;
            weights[9] = 0.12167047292780339120446315347626;
            weights[10] = 0.12583745634682829612137538251118;
            weights[11] = 0.1279381953467521569740561652247;
            weights[12] = 0.1279381953467521569740561652247;
            weights[13] = 0.12583745634682829612137538251118;
            weights[14] = 0.12167047292780339120446315347626;
            weights[15] = 0.11550566805372560135334448390678;
            weights[16] = 0.10744427011596563478257734244661;
            weights[17] = 0.097618652104113888269880664464247;
            weights[18] = 0.086190161531953275917185202983743;
            weights[19] = 0.073346481411080305734033615253117;
            weights[20] = 0.059298584915436780746367758500109;
            weights[21] = 0.044277438817419806168602748211338;
            weights[22] = 0.028531388628933663181307815951878;
            weights[23] = 0.012341229799987199546805667070037;

            break;

        case 25:

            // Coordinates:
            coordinates[0] = -0.9955569697904980979087849468939;
            coordinates[3] = -0.97666392145951751149831538647959;
            coordinates[6] = -0.94297457122897433941401116965847;
            coordinates[9] = -0.8949919978782753688510420067828;
            coordinates[12] = -0.83344262876083400142102110869357;
            coordinates[15] = -0.75925926303735763057728286520436;
            coordinates[18] = -0.67356636847346836448512063324762;
            coordinates[21] = -0.57766293024122296772368984161265;
            coordinates[24] = -0.47300273144571496052218211500919;
            coordinates[27] = -0.36117230580938783773582173012764;
            coordinates[30] = -0.24386688372098843204519036279745;
            coordinates[33] = -0.12286469261071039638735981880804;
            coordinates[36] = 0;
            coordinates[39] = 0.12286469261071039638735981880804;
            coordinates[42] = 0.24386688372098843204519036279745;
            coordinates[45] = 0.36117230580938783773582173012764;
            coordinates[48] = 0.47300273144571496052218211500919;
            coordinates[51] = 0.57766293024122296772368984161265;
            coordinates[54] = 0.67356636847346836448512063324762;
            coordinates[57] = 0.75925926303735763057728286520436;
            coordinates[60] = 0.83344262876083400142102110869357;
            coordinates[63] = 0.8949919978782753688510420067828;
            coordinates[66] = 0.94297457122897433941401116965847;
            coordinates[69] = 0.97666392145951751149831538647959;
            coordinates[72] = 0.9955569697904980979087849468939;

            // Weights:
            weights[0] = 0.011393798501026287947902964113235;
            weights[1] = 0.026354986615032137261901815295299;
            weights[2] = 0.040939156701306312655623487711646;
            weights[3] = 0.054904695975835191925936891540473;
            weights[4] = 0.068038333812356917207187185656708;
            weights[5] = 0.080140700335001018013234959669111;
            weights[6] = 0.091028261982963649811497220702892;
            weights[7] = 0.10053594906705064420220689039269;
            weights[8] = 0.10851962447426365311609395705012;
            weights[9] = 0.11485825914571164833932554586956;
            weights[10] = 0.1194557635357847722281781265129;
            weights[11] = 0.12224244299031004168895951894585;
            weights[12] = 0.12317605372671545120390287307905;
            weights[13] = 0.12224244299031004168895951894585;
            weights[14] = 0.1194557635357847722281781265129;
            weights[15] = 0.11485825914571164833932554586956;
            weights[16] = 0.10851962447426365311609395705012;
            weights[17] = 0.10053594906705064420220689039269;
            weights[18] = 0.091028261982963649811497220702892;
            weights[19] = 0.080140700335001018013234959669111;
            weights[20] = 0.068038333812356917207187185656708;
            weights[21] = 0.054904695975835191925936891540473;
            weights[22] = 0.040939156701306312655623487711646;
            weights[23] = 0.026354986615032137261901815295299;
            weights[24] = 0.011393798501026287947902964113235;

            break;

        case 26:

            // Coordinates:
            coordinates[0] = -0.99588570114561692900321695932291;
            coordinates[3] = -0.97838544595647099110058035431193;
            coordinates[6] = -0.94715906666171425013591528351804;
            coordinates[9] = -0.90263786198430707421766559923121;
            coordinates[12] = -0.84544594278849801879750706146784;
            coordinates[15] = -0.77638594882067885619296724724228;
            coordinates[18] = -0.69642726041995726486381391372942;
            coordinates[21] = -0.60669229301761806323197874691689;
            coordinates[24] = -0.50844071482450571769570306472557;
            coordinates[27] = -0.40305175512348630648107737709888;
            coordinates[30] = -0.29200483948595689514283538207783;
            coordinates[33] = -0.17685882035689018396905774841834;
            coordinates[36] = -0.059230093429313207093718575198403;
            coordinates[39] = 0.059230093429313207093718575198403;
            coordinates[42] = 0.17685882035689018396905774841834;
            coordinates[45] = 0.29200483948595689514283538207783;
            coordinates[48] = 0.40305175512348630648107737709888;
            coordinates[51] = 0.50844071482450571769570306472557;
            coordinates[54] = 0.60669229301761806323197874691689;
            coordinates[57] = 0.69642726041995726486381391372942;
            coordinates[60] = 0.77638594882067885619296724724228;
            coordinates[63] = 0.84544594278849801879750706146784;
            coordinates[66] = 0.90263786198430707421766559923121;
            coordinates[69] = 0.94715906666171425013591528351804;
            coordinates[72] = 0.97838544595647099110058035431193;
            coordinates[75] = 0.99588570114561692900321695932291;

            // Weights:
            weights[0] = 0.010551372617343007155651187685252;
            weights[1] = 0.024417851092631908789615827519788;
            weights[2] = 0.03796238329436276395030314124885;
            weights[3] = 0.050975825297147811998319900724073;
            weights[4] = 0.063274046329574835539453689907045;
            weights[5] = 0.074684149765659745887075796102848;
            weights[6] = 0.085045894313485239210447765079982;
            weights[7] = 0.094213800355914148463664883067303;
            weights[8] = 0.10205916109442542323841407025343;
            weights[9] = 0.108471840528576590656579426728;
            weights[10] = 0.1133618165463196665494407184426;
            weights[11] = 0.11666044348529658204466250754036;
            weights[12] = 0.11832141527926227651637108570047;
            weights[13] = 0.11832141527926227651637108570047;
            weights[14] = 0.11666044348529658204466250754036;
            weights[15] = 0.1133618165463196665494407184426;
            weights[16] = 0.108471840528576590656579426728;
            weights[17] = 0.10205916109442542323841407025343;
            weights[18] = 0.094213800355914148463664883067303;
            weights[19] = 0.085045894313485239210447765079982;
            weights[20] = 0.074684149765659745887075796102848;
            weights[21] = 0.063274046329574835539453689907045;
            weights[22] = 0.050975825297147811998319900724073;
            weights[23] = 0.03796238329436276395030314124885;
            weights[24] = 0.024417851092631908789615827519788;
            weights[25] = 0.010551372617343007155651187685252;

            break;

        case 27:

            // Coordinates:
            coordinates[0] = -0.99617926288898856693888720838123;
            coordinates[3] = -0.97992347596150122285587335566105;
            coordinates[6] = -0.95090055781470500685190803064388;
            coordinates[9] = -0.90948232067749110430064501820969;
            coordinates[12] = -0.85620790801829449030273722270684;
            coordinates[15] = -0.79177163907050822714439734410727;
            coordinates[18] = -0.71701347373942369929481621164234;
            coordinates[21] = -0.63290797194649514092773463763449;
            coordinates[24] = -0.54055156457945689490030094155998;
            coordinates[27] = -0.44114825175002688058597415568928;
            coordinates[30] = -0.33599390363850889973031903420728;
            coordinates[33] = -0.22645936543953685885723910736023;
            coordinates[36] = -0.11397258560952996693289498386998;
            coordinates[39] = 0;
            coordinates[42] = 0.11397258560952996693289498386998;
            coordinates[45] = 0.22645936543953685885723910736023;
            coordinates[48] = 0.33599390363850889973031903420728;
            coordinates[51] = 0.44114825175002688058597415568928;
            coordinates[54] = 0.54055156457945689490030094155998;
            coordinates[57] = 0.63290797194649514092773463763449;
            coordinates[60] = 0.71701347373942369929481621164234;
            coordinates[63] = 0.79177163907050822714439734410727;
            coordinates[66] = 0.85620790801829449030273722270684;
            coordinates[69] = 0.90948232067749110430064501820969;
            coordinates[72] = 0.95090055781470500685190803064388;
            coordinates[75] = 0.97992347596150122285587335566105;
            coordinates[78] = 0.99617926288898856693888720838123;

            // Weights:
            weights[0] = 0.0097989960512943602611500550912591;
            weights[1] = 0.022686231596180623196034206446761;
            weights[2] = 0.035297053757419711022578289304712;
            weights[3] = 0.047449412520615062704096710114185;
            weights[4] = 0.058983536859833599110300833719532;
            weights[5] = 0.069748823766245592984322888356667;
            weights[6] = 0.079604867773057771263074959009842;
            weights[7] = 0.088423158543756950194322802853749;
            weights[8] = 0.096088727370028507565652646558106;
            weights[9] = 0.10250163781774579867124771153266;
            weights[10] = 0.10757828578853318721216298442666;
            weights[11] = 0.11125248835684519267216309604285;
            weights[12] = 0.1134763461089651486203699480921;
            weights[13] = 0.11422086737895698904504573690184;
            weights[14] = 0.1134763461089651486203699480921;
            weights[15] = 0.11125248835684519267216309604285;
            weights[16] = 0.10757828578853318721216298442666;
            weights[17] = 0.10250163781774579867124771153266;
            weights[18] = 0.096088727370028507565652646558106;
            weights[19] = 0.088423158543756950194322802853749;
            weights[20] = 0.079604867773057771263074959009842;
            weights[21] = 0.069748823766245592984322888356667;
            weights[22] = 0.058983536859833599110300833719532;
            weights[23] = 0.047449412520615062704096710114185;
            weights[24] = 0.035297053757419711022578289304712;
            weights[25] = 0.022686231596180623196034206446761;
            weights[26] = 0.0097989960512943602611500550912591;

            break;

        case 28:

            // Coordinates:
            coordinates[0] = -0.99644249757395444995043639048331;
            coordinates[3] = -0.98130316537087275369455994580783;
            coordinates[6] = -0.95425928062893819725410183970522;
            coordinates[9] = -0.91563302639213207386968942332993;
            coordinates[12] = -0.86589252257439504894225456737969;
            coordinates[15] = -0.80564137091717917144788595542528;
            coordinates[18] = -0.73561087801363177202814451029253;
            coordinates[21] = -0.65665109403886496121989817650674;
            coordinates[24] = -0.56972047181140171930800328335643;
            coordinates[27] = -0.47587422495511826103441184766743;
            coordinates[30] = -0.37625151608907871022135720955609;
            coordinates[33] = -0.27206162763517807767682635612577;
            coordinates[36] = -0.16456928213338077128147177789117;
            coordinates[39] = -0.05507928988403427042651652734188;
            coordinates[42] = 0.05507928988403427042651652734188;
            coordinates[45] = 0.16456928213338077128147177789117;
            coordinates[48] = 0.27206162763517807767682635612577;
            coordinates[51] = 0.37625151608907871022135720955609;
            coordinates[54] = 0.47587422495511826103441184766743;
            coordinates[57] = 0.56972047181140171930800328335643;
            coordinates[60] = 0.65665109403886496121989817650674;
            coordinates[63] = 0.73561087801363177202814451029253;
            coordinates[66] = 0.80564137091717917144788595542528;
            coordinates[69] = 0.86589252257439504894225456737969;
            coordinates[72] = 0.91563302639213207386968942332993;
            coordinates[75] = 0.95425928062893819725410183970522;
            coordinates[78] = 0.98130316537087275369455994580783;
            coordinates[81] = 0.99644249757395444995043639048331;

            // Weights:
            weights[0] = 0.0091242825930945177388161539229517;
            weights[1] = 0.021132112592771259751500380993265;
            weights[2] = 0.032901427782304379977630819170532;
            weights[3] = 0.044272934759004227839587877653207;
            weights[4] = 0.055107345675716745431482918226946;
            weights[5] = 0.065272923966999595793397566775505;
            weights[6] = 0.074646214234568779023931887173022;
            weights[7] = 0.083113417228901218390396498244332;
            weights[8] = 0.090571744393032840942186031336784;
            weights[9] = 0.096930657997929915850489006095441;
            weights[10] = 0.10211296757806076981421663850571;
            weights[11] = 0.10605576592284641791041643699681;
            weights[12] = 0.10871119225829413525357151930367;
            weights[13] = 0.11004701301647519628237626560182;
            weights[14] = 0.11004701301647519628237626560182;
            weights[15] = 0.10871119225829413525357151930367;
            weights[16] = 0.10605576592284641791041643699681;
            weights[17] = 0.10211296757806076981421663850571;
            weights[18] = 0.096930657997929915850489006095441;
            weights[19] = 0.090571744393032840942186031336784;
            weights[20] = 0.083113417228901218390396498244332;
            weights[21] = 0.074646214234568779023931887173022;
            weights[22] = 0.065272923966999595793397566775505;
            weights[23] = 0.055107345675716745431482918226946;
            weights[24] = 0.044272934759004227839587877653207;
            weights[25] = 0.032901427782304379977630819170532;
            weights[26] = 0.021132112592771259751500380993265;
            weights[27] = 0.0091242825930945177388161539229517;

            break;

        case 29:

            // Coordinates:
            coordinates[0] = -0.99667944226059658616319153254935;
            coordinates[3] = -0.98254550526141317487092601578638;
            coordinates[6] = -0.95728559577808772579820803698082;
            coordinates[9] = -0.92118023295305878509375343608311;
            coordinates[12] = -0.87463780492010279041779342125658;
            coordinates[15] = -0.81818548761525244498957221457878;
            coordinates[18] = -0.75246285173447713391261007721214;
            coordinates[21] = -0.67821453760268651515618500539199;
            coordinates[24] = -0.59628179713822782037958621118899;
            coordinates[27] = -0.50759295512422764210262791962752;
            coordinates[30] = -0.41315288817400866389070658603162;
            coordinates[33] = -0.31403163786763993494819592319105;
            coordinates[36] = -0.21135228616600107450637572890294;
            coordinates[39] = -0.10627823013267923017098239243038;
            coordinates[42] = 0;
            coordinates[45] = 0.10627823013267923017098239243038;
            coordinates[48] = 0.21135228616600107450637572890294;
            coordinates[51] = 0.31403163786763993494819592319105;
            coordinates[54] = 0.41315288817400866389070658603162;
            coordinates[57] = 0.50759295512422764210262791962752;
            coordinates[60] = 0.59628179713822782037958621118899;
            coordinates[63] = 0.67821453760268651515618500539199;
            coordinates[66] = 0.75246285173447713391261007721214;
            coordinates[69] = 0.81818548761525244498957221457878;
            coordinates[72] = 0.87463780492010279041779342125658;
            coordinates[75] = 0.92118023295305878509375343608311;
            coordinates[78] = 0.95728559577808772579820803698082;
            coordinates[81] = 0.98254550526141317487092601578638;
            coordinates[84] = 0.99667944226059658616319153254935;

            // Weights:
            weights[0] = 0.0085169038787464096542638133022498;
            weights[1] = 0.019732085056122705983859801640396;
            weights[2] = 0.030740492202093622644408525374617;
            weights[3] = 0.041402062518682836104830010114077;
            weights[4] = 0.051594826902497923912594381179543;
            weights[5] = 0.061203090657079138542109848023907;
            weights[6] = 0.070117933255051278569581486948879;
            weights[7] = 0.07823832713576378382814488865968;
            weights[8] = 0.085472257366172527545344849297208;
            weights[9] = 0.091737757139258763347966411077111;
            weights[10] = 0.096963834094408606301900074882689;
            weights[11] = 0.1010912737599149661218205469075;
            weights[12] = 0.10407331007772937391332847128512;
            weights[13] = 0.10587615509732094140659132785219;
            weights[14] = 0.10647938171831424424651112690968;
            weights[15] = 0.10587615509732094140659132785219;
            weights[16] = 0.10407331007772937391332847128512;
            weights[17] = 0.1010912737599149661218205469075;
            weights[18] = 0.096963834094408606301900074882689;
            weights[19] = 0.091737757139258763347966411077111;
            weights[20] = 0.085472257366172527545344849297208;
            weights[21] = 0.07823832713576378382814488865968;
            weights[22] = 0.070117933255051278569581486948879;
            weights[23] = 0.061203090657079138542109848023907;
            weights[24] = 0.051594826902497923912594381179543;
            weights[25] = 0.041402062518682836104830010114077;
            weights[26] = 0.030740492202093622644408525374617;
            weights[27] = 0.019732085056122705983859801640396;
            weights[28] = 0.0085169038787464096542638133022498;

            break;

        case 30:

            // Coordinates:
            coordinates[0] = -0.9968934840746495402716300509187;
            coordinates[3] = -0.98366812327974720997003258160566;
            coordinates[6] = -0.9600218649683075122168710255818;
            coordinates[9] = -0.92620004742927432587932427708047;
            coordinates[12] = -0.88256053579205268154311646253023;
            coordinates[15] = -0.8295657623827683974428981197325;
            coordinates[18] = -0.7677774321048261949179773409745;
            coordinates[21] = -0.69785049479331579693229238802664;
            coordinates[24] = -0.62052618298924286114047755643119;
            coordinates[27] = -0.53662414814201989926416979331107;
            coordinates[30] = -0.44703376953808917678060990032285;
            coordinates[33] = -0.35270472553087811347103720708937;
            coordinates[36] = -0.25463692616788984643980512981781;
            coordinates[39] = -0.15386991360858354696379467274326;
            coordinates[42] = -0.051471842555317695833025213166723;
            coordinates[45] = 0.051471842555317695833025213166723;
            coordinates[48] = 0.15386991360858354696379467274326;
            coordinates[51] = 0.25463692616788984643980512981781;
            coordinates[54] = 0.35270472553087811347103720708937;
            coordinates[57] = 0.44703376953808917678060990032285;
            coordinates[60] = 0.53662414814201989926416979331107;
            coordinates[63] = 0.62052618298924286114047755643119;
            coordinates[66] = 0.69785049479331579693229238802664;
            coordinates[69] = 0.7677774321048261949179773409745;
            coordinates[72] = 0.8295657623827683974428981197325;
            coordinates[75] = 0.88256053579205268154311646253023;
            coordinates[78] = 0.92620004742927432587932427708047;
            coordinates[81] = 0.9600218649683075122168710255818;
            coordinates[84] = 0.98366812327974720997003258160566;
            coordinates[87] = 0.9968934840746495402716300509187;

            // Weights:
            weights[0] = 0.0079681924961666056154658834746736;
            weights[1] = 0.018466468311090959142302131912047;
            weights[2] = 0.028784707883323369349719179611292;
            weights[3] = 0.038799192569627049596801936446348;
            weights[4] = 0.048402672830594052902938140422808;
            weights[5] = 0.057493156217619066481721689402056;
            weights[6] = 0.065974229882180495128128515115962;
            weights[7] = 0.073755974737705206268243850022191;
            weights[8] = 0.08075589522942021535469493846053;
            weights[9] = 0.086899787201082979802387530715126;
            weights[10] = 0.092122522237786128717632707087619;
            weights[11] = 0.09636873717464425963946862635181;
            weights[12] = 0.099593420586795267062780282103569;
            weights[13] = 0.10176238974840550459642895216855;
            weights[14] = 0.10285265289355884034128563670542;
            weights[15] = 0.10285265289355884034128563670542;
            weights[16] = 0.10176238974840550459642895216855;
            weights[17] = 0.099593420586795267062780282103569;
            weights[18] = 0.09636873717464425963946862635181;
            weights[19] = 0.092122522237786128717632707087619;
            weights[20] = 0.086899787201082979802387530715126;
            weights[21] = 0.08075589522942021535469493846053;
            weights[22] = 0.073755974737705206268243850022191;
            weights[23] = 0.065974229882180495128128515115962;
            weights[24] = 0.057493156217619066481721689402056;
            weights[25] = 0.048402672830594052902938140422808;
            weights[26] = 0.038799192569627049596801936446348;
            weights[27] = 0.028784707883323369349719179611292;
            weights[28] = 0.018466468311090959142302131912047;
            weights[29] = 0.0079681924961666056154658834746736;

            break;
            
        default:
            
            std::cout << "Error in 'gpline' namespace: trying to get Gauss points to integrate order " << integrationorder << " which is undefined (too high)" << std::endl;
            abort();

    }
}




